package com.homepage.service.mapper;

import com.homepage.domain.Headline;
import com.homepage.service.dto.HeadlineDTO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

/**
 * Mapper for the entity {@link Headline} and its DTO {@link HeadlineDTO}.
 */
@Mapper(componentModel = "spring", uses = {  })
public interface HeadlineMapper extends EntityMapper<HeadlineDTO, Headline> {

    @Mapping(target = "companyId", source = "company.id")
    HeadlineDTO toDto(Headline headline);

    @Mapping(target = "company.id", source = "companyId")
    Headline toEntity(HeadlineDTO dto);
}
